-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(docs/single): support files with .markdown
extension
#549
fix(docs/single): support files with .markdown
extension
#549
Conversation
fixing typo, removing unused version param, stricter error checks
src/cmds/changelogs/single.js
Outdated
@@ -45,7 +45,7 @@ module.exports = class SingleChangelogCommand { | |||
return Promise.reject(new Error(`No file path provided. Usage \`${config.get('cli')} ${this.usage}\`.`)); | |||
} | |||
|
|||
if (filePath.endsWith('.md') === false || !filePath.endsWith('.markdown') === false) { | |||
if (!(filePath.endsWith('.md') || filePath.endsWith('.markdown'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had case-sensitive filesystems on my mind this week and I'm wondering if we should support .MD
and .Markdown
, or any casing variation of them.
src/cmds/changelogs/single.js
Outdated
@@ -45,7 +45,7 @@ module.exports = class SingleChangelogCommand { | |||
return Promise.reject(new Error(`No file path provided. Usage \`${config.get('cli')} ${this.usage}\`.`)); | |||
} | |||
|
|||
if (filePath.endsWith('.md') === false || !filePath.endsWith('.markdown') === false) { | |||
if (!(filePath.endsWith('.md') || filePath.endsWith('.markdown'))) { | |||
return Promise.reject(new Error('The file path specified is not a markdown file.')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be capitalized?
return Promise.reject(new Error('The file path specified is not a markdown file.')); | |
return Promise.reject(new Error('The file path specified is not a Markdown file.')); |
* chore: create custompages cmd category * test: fixtures * feat: initial pass at commands as part of this, we had to slightly refactor the pushDoc function to augment the data to support the HTML file handling required by the custompages API * test: initial pass at tests * docs: update README usage * test: remove unused version params, stricter error checks * fix(docs/single): support files with `.markdown` extension (#549) * fix: support files with .markdown extension * test: random cleanup fixing typo, removing unused version param, stricter error checks * chore: capitalize Markdown * chore: lowercase all file extension checks * refactor: DRY some docs logic (#550) * fix: support files with .markdown extension * test: random cleanup fixing typo, removing unused version param, stricter error checks * refactor: DRY some docs logic * feat: add retag-release workflow to add a vX.Y.Z tag for our GitHub Action (#545) * feat: add retag-release workflow to add a vX.Y.Z tag for our GitHub Action * Update .github/workflows/retag-release.yaml Co-authored-by: Kanad Gupta <[email protected]> * refactor: move code out of YAML and into bin/ script * fix: lint fixes Co-authored-by: Kanad Gupta <[email protected]> Co-authored-by: Ryan Park <[email protected]> Co-authored-by: Ryan Park <[email protected]>
🧰 Changes
Fixes an issue where our single commands had faulty conditional logic and therefore weren't working on
.markdown
files properly.Also leans up a few tests, see 21ba907
🧬 QA & Testing
Do the test changes look good and do they pass?